package com.lovi.io_;

import java.io.FileNotFoundException;
import java.io.PrintWriter;

/**
 * 直接通过printWriter写入东西到文件
 */
public class PrintWriter01 {
    public static void main(String[] args) throws FileNotFoundException {
        String filePath = "D:\\Desktop\\test\\test06.txt";
        PrintWriter printWriter = new PrintWriter(filePath);
        printWriter.write("我爱你哦！！");
        printWriter.close();

    }
}
